import request from '@/utils/request'

export function getCreditList (params) {
	return request({
		url: '/basic-api/zd/credit/getCreditList',
		method: 'get',
		params
	})
}
export function getHisCreditList (custId) {
	return request({
		url: '/basic-api/zd/credit/getHisCreditList/' + custId,
		method: 'get'
	})
}
export function getCreditByCustId (custId) {
	return request({
		url: '/basic-api/zd/credit/getCreditByCustId/' + custId,
		method: 'get',
	})
}

export function addCredit (data) {
	return request({
		url: '/basic-api/zd/credit/add',
		method: 'post',
		data
	})
}

export function updateCredit (data) {
	return request({
		url: '/basic-api/zd/credit/update',
		method: 'post',
		data
	})
}

export function removeCredit (id) {
	return request({
		url: '/basic-api/zd/credit/remove/' + id,
		method: 'post',
	})
}
export function ifuse (id) {
	return request({
		url: '/basic-api/zd/credit/ifUse/' + id,
		method: 'post',
	})
}

